[X,Y] = ndgrid(0:0.5:1, 0:0.5:1);
node = [X(:),Y(:)];
elem = [1 2 5 4; 2 3 6 5; 4 5 8 7; 5 6 9 8];
showmesh(node, elem);
save meshex1.mat